﻿<navigation:Page x:Class="IndexMarkSilverlightClient.Views.Documents" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"         
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:doccontrols="clr-namespace:FirstFloor.Documents.Controls;assembly=FirstFloor.Documents.Controls"      
           xmlns:mycontrols="clr-namespace:SharedCode.Controls;assembly=SharedCode"                       
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Документация">

    <UserControl.Resources>
        <ControlTemplate x:Key="ListBoxItemTemplate">
            <Border BorderBrush="CadetBlue" Margin="3" BorderThickness="1">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Image Source="Resources/Book_VSHelp.png" Grid.Column="0"/>
                    <ContentPresenter Grid.Column="1"
                                      Margin="{TemplateBinding Padding}" 
                                      VerticalAlignment="Center"/>
                </Grid>
            </Border>
        </ControlTemplate>

        <ControlTemplate x:Key="SelectedListBoxItemTemplate">
            <Border BorderBrush="Blue" Background="#6677A1DD" Margin="3" BorderThickness="2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Image Source="Resources/Book_VSHelp.png" Grid.Column="0"/>
                    <ContentPresenter Grid.Column="1"
                                      Margin="{TemplateBinding Padding}" 
                                      VerticalAlignment="Center"/>
                </Grid>
            </Border>
        </ControlTemplate>

    </UserControl.Resources>    

    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition MaxWidth="320" Width="320" x:Name="ListDocumentColumn"/>
            <ColumnDefinition x:Name="ContentColumn"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.RowSpan="2" Style="{StaticResource ContentPanelStyle}">
            <ListBox x:Name="DocListBox" SelectionChanged="ListBox_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Vertical" Width="300">
                            <TextBlock Text="{Binding Key}" VerticalAlignment="Center" TextWrapping="Wrap"/>
                            <TextBlock Text="{Binding Value}" VerticalAlignment="Center" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>

                <!--</ListBox.ItemTemplate>
                <ListBoxItem Template="{StaticResource ListBoxItemTemplate}">
                    <StackPanel Orientation="Vertical" Width="300">
                        <TextBlock Text="Положение о мат. стимулировании" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        <TextBlock Text="Положение о материальном стимулировании ППС УГТУ" VerticalAlignment="Center" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                    </StackPanel>
                </ListBoxItem>
                <ListBoxItem Template="{StaticResource ListBoxItemTemplate}">
                    <StackPanel Orientation="Vertical" Width="300">
                        <TextBlock Text="Приложение 1" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        <TextBlock Text="Индексная система оценки деятельности ППС" VerticalAlignment="Center" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                    </StackPanel>
                </ListBoxItem>
                <ListBoxItem Template="{StaticResource ListBoxItemTemplate}">
                    <StackPanel Orientation="Vertical" Width="300">
                        <TextBlock Text="Приложение 2" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        <TextBlock Text="Приложение к индексной системе" VerticalAlignment="Center" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                    </StackPanel>
                </ListBoxItem>
                <ListBoxItem Template="{StaticResource ListBoxItemTemplate}">
                    <StackPanel Orientation="Vertical" Width="300">
                        <TextBlock Text="Приложение 8" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        <TextBlock Text="Перечень руководителей, показателей и документов" VerticalAlignment="Center" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                    </StackPanel>
                </ListBoxItem>
                <ListBoxItem Template="{StaticResource ListBoxItemTemplate}">
                    <StackPanel Orientation="Vertical" Width="300">
                        <TextBlock Text="Приложение 5" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        <TextBlock Text="Индексная система в вопросах и ответах" VerticalAlignment="Center" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                    </StackPanel>
                </ListBoxItem>

                <ListBoxItem Template="{StaticResource ListBoxItemTemplate}">
                    <StackPanel Orientation="Vertical" Width="300">
                        <TextBlock Text="Положение о СМС докторов" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        <TextBlock Text="Положение об оценке научно-исследовательской и инновационной деятельности и материальном стимулировании докторов наук в УГТУ" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                    </StackPanel>
                </ListBoxItem>

                <ListBoxItem Template="{StaticResource ListBoxItemTemplate}">
                    <StackPanel Orientation="Vertical" Width="300">
                        <TextBlock Text="Приказ о СМС ППС" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        <TextBlock Text="Приказ о порядке ввода данных в Индексную систему за 2010/2011 учебный год и расчете стимулирующих надбавок ППС на 2010/2011 учебный год" FontSize="12" Foreground="#FF888888" FontStyle="Italic" FontFamily="Times New Roman" Margin="10,5,0,5" TextWrapping="Wrap"/>
                    </StackPanel>
                </ListBoxItem>-->

            </ListBox>
        </StackPanel>

        <controls:GridSplitter Grid.Column="0" Grid.RowSpan="2" Background="CornflowerBlue" Width="6" BorderBrush="Transparent" BorderThickness="0" Style="{StaticResource MainGridSplitterStyle}"/>

        <doccontrols:FixedDocumentViewer x:Name="viewer" Grid.Column="1" Grid.Row="0" Background="{StaticResource ContentPanelBackgroundColorBrush3}"/>

        <StackPanel x:Name="panel" Orientation="Horizontal" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Visibility="Collapsed" Background="{StaticResource ContentPanelBackgroundColorBrush3}">
            <TextBlock Text="{Binding PageNumber, ElementName=viewer, Mode=TwoWay}" Width="Auto" VerticalAlignment="Center" Margin="5, 0, 0, 0"/>
            <TextBlock Text=" из " VerticalAlignment="Center"/>
            <TextBlock Text="{Binding PageCount, ElementName=viewer}" Width="Auto" VerticalAlignment="Center" Margin="0, 0, 5, 0"/>
            <Button x:Name="FirstButton" Click="FirstButton_Click">
                <Image Source="Resources/Move/Move_First.png"/>
            </Button>
            <Button x:Name="BackButton" Click="BackButton_Click">
                <Image Source="Resources/Move/Move_Back.png"/>
            </Button>
            <Button x:Name="NextButton" Click="NextButton_Click">
                <Image Source="Resources/Move/Move_Next.png"/>
            </Button>
            <Button x:Name="LastButton" Click="LastButton_Click" Margin="0, 0, 5, 0">
                <Image Source="Resources/Move/Move_Last.png"/>
            </Button>
            <ComboBox Name="comboBox1" SelectedIndex="3" Width="102" SelectionChanged="comboBox1_SelectionChanged">
                <ComboBoxItem Content="100%"/>
                <ComboBoxItem Content="200%"/>
                <ComboBoxItem Content="75%"/>
                <ComboBoxItem Content="По высоте"/>
                <ComboBoxItem Content="По ширине"/>
            </ComboBox>
        </StackPanel>

        <mycontrols:LoadingBar x:Name="loadingBar" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="2" Grid.RowSpan="2" Visibility="Collapsed"/>
    </Grid>
</navigation:Page>
